#include <iostream>
#include <functional>

void output(int x, int y)
{
    std::cout << x << " " << y << std::endl;
}


int main(void)
{
    std::bind(output, 1, 2)();//1 2
    std::bind(output, std::placeholders::_1, 1)(2);// 2 1
    std::bind(output, 2, std::placeholders::_1)(1);// 2 1

    std::bind(output, 4, std::placeholders::_2)(1, 3);  //调用时，第一个参数(1)被吞掉了 //4 3 
    std::bind(output, 4, std::placeholders::_4)(1, 2, 3, 3); //占位符对应的数是从括号内，选择第几个参数的意思吗？//4 3


    std::bind(output, std::placeholders::_1, std::placeholders::_2)(0, 9);//0 9 


    return 0;
}
